/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function oneIsEmpty()
{
	if(document.addForm.name.value==''||
	   document.addForm.age.value==''||
	   document.addForm.address.value=='')
	{
		alert("Please fill up all the text fields");
		return false;
	}
	else
	{
		document.getElementById('e4').innerHTML = '';
		return true;
	}
}

function oneIsEmpty2()
{
	if(document.addForm.subjName.value==''||
	   document.addForm.passing.value=='')
	{
		alert("Please fill up all the text fields");
		return false;
	}
	else
	{
		document.getElementById('e4').innerHTML = '';
		return true;
	}
}

function oneIsEmpty3()
{
	if(document.addForm.teachName.value=='')
	{
		alert("Please fill up all the text fields");
		return false;
	}
	else
	{
		document.getElementById('e4').innerHTML = '';
		return true;
	}
}

function validate(evt)
 {
  if(evt.keyCode!=8)
  {
  var theEvent = evt || window.event;
  var key = theEvent.keyCode || theEvent.which;
  key = String.fromCharCode( key );
  var regex = /[0-9]|\./;
  if( !regex.test(key) )
 {
    theEvent.returnValue = false;
    if(theEvent.preventDefault) theEvent.preventDefault();
  }
  }
}
